extends ./../layout

block title

	meta(name="description" content="#{meta.description}")
	meta(name="keywords" content="go，html，css，后端，vue，php，java，node，koa, 在线技术学习")
	link(rel="stylesheet" href="/css/home/info.css" )

block content
	.info(class="pages" data-module="info")
		.container
			if !(courseList.hasOwnProperty("code"))
				.info-l-m
					.info-top
						.info-top-left
							img(src=`${courseList.courseImageUrl}`)
						.info-top-right
							h2
								| #{courseList.courseTitle}
								div.uk-label.uk-label-danger.uk-margin-left #{courseList.coursePrice != 0 ? '收费课程' : '免费课程'}
							ul
								li
									img(src="/img/spjcdet_img4.png")
									p #{courseList.courseClass}
								li
									img(src="/img/spjcdet_img1.png")
									p #{courseList.courseResource}
								li
									img(src="/img/spjcdet_img3.png")
									p #{courseList.coursePrice == 0 ? '免费': `${courseList.coursePrice}元`}
								li
									img(src="/img/spjcdet_img2.jpg")
									p #{courseVideoList.length}节课程

							.top-right-introduce
								p.title 课程介绍
								p.introduce-info #{courseList.courseDesc}
							.top-right-action
								if courseList.coursePrice != 0
									button.uk-button.uk-button-danger.buyCart
										span.uk-margin-small-right(uk-icon='cart')
										| 加入购物车
								a.uk-button.uk-button-primary(target="_blank" href="/coures/play/#{courseList.objectId}/#{courseVideoList[0].objectId}")
									span.uk-margin-small-right(uk-icon='pencil')
									| 开始学习
					.info-list
						h4
							span(uk-icon='icon: list; ratio: 1.2')
							span.h-title 课程目录 ( #{courseVideoList.length}章 )
						ul
							each item in courseVideoList
								li
									.i-title(id="#{item.objectId}")
										span(uk-icon='icon: play-circle; ratio: 1')
										a(href=`/coures/play/${courseList.objectId}\/${item.objectId}` target="_blank")
											| #{item.courseTitle}
										if courseList.coursePrice != 0
											div.uk-label.uk-label-danger.uk-margin-left #{item.courseAudition ? '免费试听' : ''}
									p.more-i #{item.courseDesc}
			else
				.nodata
					h2.uk-text-center.uk-margin-medium-top.uk-margin-medium-bottom 请勿非法操作